/**
 * 
 */
package Singleton;

/**
 * @author sz
 *
 * create time：2012-8-3
 * 懒汉式
 */
public class Singleton {

	private static Singleton instance;
	
	private Singleton(){
		
	}
	
	public static Singleton getInstance(){
		
		if(instance == null){
			instance = new Singleton();
		}
		
		return instance;
	}
	
	@Override
	protected void finalize() throws Throwable {
		System.out.println("finalize");
	}
}
